Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

feat: add lastPinTimestamp to DMChannel, update lastPinTimestamp #320

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tjrgg
Copy link
Contributor

@tjrgg tjrgg commented Jul 27, 2020

  • Adds missing lastPinTimestamp property to DMChannel.
  • Updates lastPinTimestamp when CHANNEL_PINS_UPDATE action runs.

@@ -14,6 +14,8 @@ export default class CoreAction extends Action {
const channel = guild ? guild.channels.get(data.d.channel_id) : this.client.dms.get(data.d.channel_id);
if (!channel || !isTextBasedChannel(channel)) return;

channel.lastPinTimestamp = data.d.last_pin_timestamp ?? null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can last_pin_timestamp ever be undefined? If so, you should guard the set with the isSet util from this library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants